Optimal. Leaf size=15 \[ \log (\cosh (x))-\frac{1}{2} \log \left (\cosh ^2(x)+1\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0326715, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {3194, 36, 29, 31} \[ \log (\cosh (x))-\frac{1}{2} \log \left (\cosh ^2(x)+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3194
Rule 36
Rule 29
Rule 31
Rubi steps
\begin{align*} \int \frac{\tanh (x)}{1+\cosh ^2(x)} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{x (1+x)} \, dx,x,\cosh ^2(x)\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,\cosh ^2(x)\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,\cosh ^2(x)\right )\\ &=\log (\cosh (x))-\frac{1}{2} \log \left (1+\cosh ^2(x)\right )\\ \end{align*}
Mathematica [A] time = 0.0082814, size = 15, normalized size = 1. \[ \log (\cosh (x))-\frac{1}{2} \log \left (\cosh ^2(x)+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 14, normalized size = 0.9 \begin{align*} \ln \left ( \cosh \left ( x \right ) \right ) -{\frac{\ln \left ( 1+ \left ( \cosh \left ( x \right ) \right ) ^{2} \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.10785, size = 31, normalized size = 2.07 \begin{align*} -\frac{1}{2} \, \log \left (6 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1\right ) + \log \left (e^{\left (-2 \, x\right )} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.57228, size = 165, normalized size = 11. \begin{align*} -\frac{1}{2} \, \log \left (\frac{2 \,{\left (\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} + 3\right )}}{\cosh \left (x\right )^{2} - 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}}\right ) + \log \left (\frac{2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tanh{\left (x \right )}}{\cosh ^{2}{\left (x \right )} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23053, size = 31, normalized size = 2.07 \begin{align*} -\frac{1}{2} \, \log \left (e^{\left (4 \, x\right )} + 6 \, e^{\left (2 \, x\right )} + 1\right ) + \log \left (e^{\left (2 \, x\right )} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]